﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using BOSS.Dao.Security;
using BOSS.Domain.Security;

namespace BOSS.Dao.NHibernate.Security
{
    /// <summary>
    /// 角色 DAO
    /// </summary>
    public class RoleDao : EntityDao<Role, int>, IRoleDao
    {
        #region IRoleDao 成员

        /// <summary>
        /// 获取角色用户列表
        /// </summary>
        /// <param name="roleName"></param>
        /// <returns></returns>
        [Obsolete]
        public IList<Account> SelectAccountsByRoleName(string roleName)
        {
            return this.HibernateTemplate.Find<Account>("from Account a where a.Role.Name = ?", roleName);
        }

        #endregion
    }
}
